import http from './http'
let root=''
if (process.env.NODE_ENV === 'production') {
	root = '../'
	console.log("root", root)
}else{
	root = '/public'
	console.log("root", root)
}

// 合同
//export const pdfUrl = root + '/m/install/contract/'
// 审核员列表获取接口
// export const getAssistUserInfo = (params) => {
//   return http.fetchGet(api.getAssistUserInfo, params)
// /?s=App.Tasks.Updatetask fetchPost
export default {
	// 统计订单数据 ?s=Admin.Order.Itemall
	OrderItemall (params) {
		return http.fetchPost(root + "/?s=Admin.Order.Itemall", params)
	},
	// App.Merorder.Uprecharge 调起支付
	MerorderUprecharge (params) {
		return http.fetchPost(root + "/?s=App.Merorder.Uprecharge", params)
	},
	// ?s=App.Merorder.Recharge（创建订单）
	MerorderRecharge (params) {
		return http.fetchPost(root + "/?s=App.Merorder.Recharge", params)
	},
	// 商户余额流水 App.Balance.Page
	BalancePage (params) {
		return http.fetchPost(root + "/?s=App.Balance.Page", params)
	},
	// 获取商家信息 App.Merchant.Item
	MerchantItem (params) {
		return http.fetchPost(root + "/?s=Admin.Merchant.Item", params)
	},
	//商品详情
	ProductItem (params) {
		return http.fetchPost(root + "/?s=App.Product.Item", params)
	},
	//核销子订单
	OrderlistSave (params) {
		return http.fetchPost(root + "?s=App.Orderlist.Save", params)
	},
	//下单与核销接口
	OrderSave (params) {
		return http.fetchPost(root + "?s=App.Order.Save", params)
	},
	// 退单接口
	OrderRefund (params) {
		return http.fetchPost(root + "?s=App.Order.Refund", params)
	},
	// 退子订单
	OrderlistRefund (params) {
		return http.fetchPost(root + "?s=App.Orderlist.Refund", params)
	},
	//商品订单子表
	OrderlistPage (params) {
		return http.fetchPost(root + "?s=App.Orderlist.Page", params)
	},
	//商品订单接口
	OrderPage (params) {
		return http.fetchPost(root + "?s=App.Order.Page", params)
	},
	async getOpenid(params){
		return await http.fetchPost(root + "?s=App.Weixin.Weixin", params)
	},
	async getWeixinConfig(params){
		return await http.fetchPost(root + "?s=Admin.Config.ItemWeixin", params)
	},
	//充值接口
	MerorderRecharge (params) {
	  return http.fetchPost(root + "?s=App.Merorder.Recharge", params)
	},
	//获取商品列表
	ProductPage (params) {
	  return http.fetchPost(root + "?s=Admin.Product.Page", params)
	},
	login(params){
		return http.fetchPost4login(root + "?s=App.Merchant.Login", params)
	},
	login(params){
		return http.fetchPost4login(root + "?s=App.Merchant.Login", params)
	},
	uploadPic(params){
		return http.fetchPostForUpload(root + "?s=App.Examples_Upload.Go", params)
	}
}